package com.test.designPattern.ch30;

/**
 * @ClassName Dispatcher
 * @Description TODO
 * @Author 维康
 * @Date 2018/7/2 17:04
 * @Version 1.0
 **/
public class Dispatcher {
    private StudentView studentView;
    private HomeView homeView;
    public Dispatcher(){
        studentView = new StudentView();
        homeView = new HomeView();
    }

    public void dispatch(String request){
        if(request.equalsIgnoreCase("STUDENT")){
            studentView.show();
        }else{
            homeView.show();
        }
    }
}
